<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>

     // 1 , 引入第三方变量
      var a = 10;
      var b = 20;
      var tem;

      tem = a;
      a = b;
      b = tem;
      console.log(a , b);
      

    //   2 , 算数运算 
      var c = 10;
      d = 20;

      c = c + d;
      d = c - d;
      c = c - d;

      console.log(c, d);

    //  3, es6解构赋值
      var  e = 10 , f = 20;

      [e , f]  = [f , e]

      console.log(e , f);
      

    // 4,利用数组的特性交换
    
    var  g = 10;
         h = 20;

         i = [g , h]

         h = i[0];
          
         g = i[1];

         console.log(g , h);
         

         console.log(Math.SQRT2 )
        
         
    </script>
  </body>
</html>
